package object;

import java.util.logging.Level;

/**
 * @Author: Miyako
 * @Date: 2024-07-15-8:24
 * @Description:
 */
public class Score {
    private char level;


    public void setScore(int score) {
        level= getLevel(score);
    }


    private static char getLevel (int score){
        switch (score/10){
            case 10: return 's';
            case 9: return  'A';
            case 8: return  'B';//80-89
            case 7: return  'C';
            case 6: return   'D';
            default:return  'E';//0-59
        }

    }
  public String toString(){

        return "评价为"+level;
    }

}
